const express = require("express")

const app = express()

app.set('secret','adafse24gdvb')

app.use('/uploads',express.static(__dirname+'/uploads'))
app.use('/admin',express.static(__dirname+'/admin'))
app.use('/admin1',express.static(__dirname+'/admin1'))
app.use('/web',express.static(__dirname+'/web'))
app.use('/',express.static(__dirname+'/web'))
app.use(require('cors')())
app.use(express.json())

require('./plugins/db')(app)
require('./routes/admin')(app)
require('./routes/web')(app)
app.listen(3000,()=>{
    console.log('http://localhost:3000');
});